package com.mes.biz.domain;

import javax.validation.Valid;
import java.math.BigDecimal;
import java.util.Date;
import javax.validation.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.mes.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import com.mes.common.annotation.Excel;

/**
 * 收款单订单明细对象 biz_payment_bill
 * @author wy
 * @email wy
 * @date 2023-07-10
 */
@Data
public class BizPaymentBill extends BaseEntity<BizPaymentBill>
{
    private static final long serialVersionUID = 1L;

    /** 客户ID */
    @Excel(name = "客户ID")
    @NotBlank(message = "客户ID不允许为空")
    @LogField
    @FieldRemark(name = "客户ID",field = "customerId")
    private String customerId;

    /** 销售单编号 */
    @Excel(name = "销售单编号")
    @NotBlank(message = "销售单编号不允许为空")
    @LogField
    @FieldRemark(name = "销售单编号",field = "orderNumber")
    private String orderNumber;

    /** 总金额 */
    @Excel(name = "总金额")
    @LogField
    @FieldRemark(name = "总金额",field = "totalAmount")
    private BigDecimal totalAmount;

    /** 本次结算 */
    @Excel(name = "本次结算")
    @LogField
    @FieldRemark(name = "本次结算",field = "payAmount")
    private BigDecimal payAmount;

    /** 对账单号 */
    @Excel(name = "对账单号")
    @LogField
    @FieldRemark(name = "对账单号",field = "accountCode")
    private String accountCode;

    /** 对账单明细id */
    @Excel(name = "对账单明细id")
    @LogField
    @FieldRemark(name = "对账单明细id",field = "linkId")
    private String linkId;

    /** 租户id */
    @Excel(name = "租户id")
    @NotBlank(message = "租户id不允许为空")
    @LogField
    @FieldRemark(name = "租户id",field = "tenantId")
    private String tenantId;

    /** 销售单产品id */
    @LogField
    @FieldRemark(name = "销售单产品id",field = "orderProductId")
    private String orderProductId;

    @LogField
    @FieldRemark(name = "收款单id",field = "paymentId")
    private String paymentId;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date orderDate;

    private BigDecimal saleAmount;

    private BigDecimal collectedAmount;

    private int sort;

}
